package switchviz.graphic.signal;

import java.awt.Color;

public class BasicSignalDataModel 
{
	public static final String TYPEBASIC = "Basic";
	public static final String TYPETEST = "Test";
	public static final String TYPESIMPLE = "Simple";
	public static final String TYPECOMPLEX = "Complex";
	
	public static final int ALARM_NO_BOUND = 0;
	public static final int ALARM_UPPER_BOUND = 1;
	public static final int ALARM_LOWER_BOUND = 2;
	public static final int ALARM_BOTH_BOUNDS = 3;
	
	private String _name = "";
	private String _type = TYPEBASIC;
	private float _min = 0;
	private float _max = 100;
	private int _alarmmode = 0;
	private float[] _color = null;
	private int _priority = 0;
	
	public BasicSignalDataModel()
	{
		
	}
	public String getName() 
	{
		return _name;
	}
	public void setName(String name) 
	{
		this._name = name;
	}
	public String getType() 
	{
		return _type;
	}
	public void setType(String type) 
	{
		this._type = type;
	}
	public float[] getColor() 
	{
		if(_color == null)
			_color = Color.blue.getRGBColorComponents(null);
		return _color;
	}
	public void setColor(float[] color) 
	{
		this._color = color;
	}
	public float getMin() 
	{
		return _min;
	}
	public void setMin(float min) 
	{
		this._min = min;
	}
	public float getMax() 
	{
		return _max;
	}
	public void setMax(float max) 
	{
		this._max = max;
	}
	public int getAlarmmode() 
	{
		return _alarmmode;
	}
	public void setAlarmmode(int alarmmode) 
	{
		this._alarmmode = alarmmode;
	}
	public int getPriority() 
	{
		return _priority;
	}
	public void setPriority(int priority) 
	{
		this._priority = priority;
	}
	public String toString()
	{
		return getName();
	}
	
}
